#!/bin/sh
echo -------------------------------------------
echo start server
echo -------------------------------------------
# JAVA_HOME
#export JAVA_HOME=/data/jdk
# 设置项目代码路径
export _EXECJAVA="$JAVA_HOME/bin/java"

JAVA_OPTS="-XX:+UseContainerSupport -XX:InitialRAMPercentage=40.0 -XX:MinRAMPercentage=20.0 -XX:MaxRAMPercentage=80.0  -XX:-UseAdaptiveSizePolicy -XX:+UseWisp2 "
#JAVA_OPTS="-server -Xms2048M -Xmx2048M -Xss512k -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:-UseCounterDecay -XX:+AlwaysPreTouch  -XX:+DisableExplicitGC -XX:MaxTenuringThreshold=31 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC  -XX:LargePageSizeInBytes=128m  -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:MaxTenuringThreshold=6 -XX:+ExplicitGCInvokesConcurrent -XX:+ParallelRefProcEnabled"

#jar包 名称
JAR_NAME=`ls /data/webserver/*jar`

# 启动类
#$_EXECJAVA -jar $JAVANAME
$_EXECJAVA $JAVA_OPTS -jar  $JAR_NAME
